<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=7" />
<title>酒店推荐</title>
<link href="/static/AmazeUI-2.7.2/AmazeUI-2.7.2/assets/css/amazeui.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/static/AmazeUI-2.7.2/AmazeUI-2.7.2/assets/css/app.css">
<script src="/static/AmazeUI-2.7.2/AmazeUI-2.7.2/assets/js/jquery-3.3.1.min.js"></script>
<script src="/static/AmazeUI-2.7.2/AmazeUI-2.7.2/assets/js/amazeui.min.js"></script>
<link rel="stylesheet" href="/static/font-awesome-4.7.0/font-awesome-4.7.0/css/font-awesome.min.css">
<link href="/static/frontend/css/base.css" rel="stylesheet" type="text/css" />
<link href="/static/frontend/css/common.css" rel="stylesheet" type="text/css" />
<link href="/static/frontend/css/page.css" rel="stylesheet" type="text/css" />
<link href="/static/frontend/css/css.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="/static/frontend/css/nrzzsc.css" type="text/css" />
<link type="text/css" href="/static/frontend/css/nrflexslider.min.css" rel="stylesheet" />
<script src="/static/frontend/js/jquery-1.4a2.min.js" type="text/javascript"></script>
<script src="/static/frontend/js/jquery.KinSlideshow-1.1.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
	$("#KinSlideshow").KinSlideshow();
})
</script>
<script type="text/javascript" src="/static/frontend/js/jquery.flexslider.min.js"></script>
<script type="text/javascript" src="/static/frontend/js/16sucai.js"></script>

<link rel="shortcut icon" href="bitbug_favicon.ico"/>
<link rel="stylesheet" type="text/css" href="/static/frontend/css/style.css" />
<link rel="stylesheet" type="text/css" href="/static/frontend/css/think-page.css" />


<script type="text/javascript" src="/static/frontend/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
    $(function(){
        // 导航
        $(".nav>ul>li").mouseenter(function(event) {
            $(this).addClass("cur").siblings().removeClass("cur")
            $(this).children(".yincang").stop().slideDown()

        });
        $(".nav>ul>li").mouseleave(function(event) {
            $(this).removeClass("cur")
            $(this).children(".yincang").stop().slideUp()
        });
        // tejia
        $(".tejia .wenzi span").mouseenter(function(event) {
           $(this).addClass("cur").siblings().removeClass("cur")
        });
        // 品牌目的地
        $(".pinpai_inr ul li").mouseenter(function(event) {
            $(this).addClass("cur").siblings().removeClass("cur")
        });
          $(".pinpai_inr ul li").mouseleave(function(event) {
            $(".pinpai_inr ul li").removeClass("cur")
        });
         // 
         $(".tututu").mouseenter(function(event) {
             $(this).children(".heibu").stop().slideDown()
         });
         $(".tututu").mouseleave(function(event) {
             $(this).children(".heibu").stop().slideUp()
         });
        //banner
                var nowing = 0 
                var $imglis = $(".banner .list0 li")
                var $fadeCover = $(".fadeCover")
                var fadeIntime = 500
                var fadeOutime = 800
                var $circle = $(".circle li")
                var timer

                    // 定义函数
                    function rightbtn(){
                        // 先信号量的改变，
                    
                    nowing++
                    if(nowing>$imglis.length-1){
                        nowing=0
                       }
                       // 再调用函数
                    dong();
                    }
                    // 定时器业务
                     timer = setInterval(rightbtn,2000)
                    $(".banner").mouseenter(function(){
                        clearInterval(timer)
                    
                    })
                    $(".banner").mouseleave(function(){
                        clearInterval(timer)
                        timer = setInterval(rightbtn,2000)
                    })
                    // 点击小圆点业务
                    $circle.click(function(){
                        nowing = $(this).index()
                        dong()
                    })
                 function dong(){
                     // 先让fadecover淡入，让全局变白 
                  $fadeCover.fadeIn(fadeIntime,function(){
                    // ,function(){
                    // 回调函数中，就表示fadecover淡入后做的事情。
                    // 换图是干蹦的，不是淡入淡出的换,进行暗箱操作，兄弟去cur，自己加cur
                    $imglis.eq(nowing).addClass('cur').siblings().removeClass('cur')
                    // 淡出让黑布小事
                    $(this).fadeOut(fadeOutime)
                  })
                  $circle.eq(nowing).addClass("cur").siblings().removeClass("cur")
                 }

    })
</script>
<script>

</script>
</head>

<body>

<!---top s--->
<div class="header1">
  {include file="../application/frontend/view/common/top.html" /}
</div>
<!---top e--->


<!---menu s--->
<div class="nav">
   {include file="../application/frontend/view/common/nav.html"}
</div>
<!---menu e--->

<!---弹窗 s--->

<div id="select_box" style="display:none;position:fixed;width:100%;height:100%;background:rgba(0,0,0,0.4);top:0px;z-index:800;">
   <div style="width: 600px;height:400px;background: #FFF;position:absolute;transform:translate(-50%,-50%);top:50%;left: 50%;border-radius: 10px;z-index:1000" class="selected">
    <div style="padding: 10px;"><span style="margin-left: 25px;font-size: 16px;color: #555;">选择框</span><a style="float:right;display: block;width:24px;height: 24px;border:1px solid #CCC;border-radius: 100%;text-align: center;line-height: 24px;" onclick="hideScreen()">X</a>
    </div>
    <div style="margin:10px 20px;">
      <div class="item_content" style="width:100%;border:1px solid #CCC;border-radius: 5px;height:280px;padding: 5px;text-align: center;">
        <div><span id="product_name" style="color:#dd514c;font-weight: bold;font-size:25px"></span></div>
        <div style="font-size: 20px">游玩日期：<span id="date1" style="color:#dd514c;font-weight: bold;" ></span></br>
        <span id="date2" style="color:#dd514c;font-weight: bold;" ></span></div>
        <div style="font-size: 20px">单价：¥<span id="product_price" class="product_price" style="color:#dd514c;font-weight: bold;">实时价格</span></div>
        <input  type="hidden" id="user_score" value="{$user_score}" />
        <input  type="hidden" id="product_count"/>
        <div style="font-size: 20px">门票数量：<span style="color:#dd514c;font-weight: bold;"></span>
          <input class="min am-btn" name="" type="button" value="-" />
                          
          <input class="textBox" name="acount[]" type="text" value="1" style="width:30px;" readonly="readonly" id="amount"/>
          <input class="add am-btn" name="" type="button" id="btn_plus" value="+" />
        </div>
       
        <div style="font-size: 20px">总计：¥<span id="product_total" style="color:#dd514c;font-weight: bold;"></span></div>

      </div>
    </div>
     <input type="hidden" value="" class="product_number1">
    <div style="height:40px;line-height:40px;text-align: center;">
      <input type="submit" id="buy" class="am-btn am-btn-danger anniu" style="display:inline-block;width:100px;height: 30px;overflow: hidden;font-size: 14px" value="直接购买">
      <input type="submit" id="shopcart" class="am-btn am-btn-danger anniu" style="display:inline-block;width:100px;height: 30px;overflow: hidden;font-size: 14px" value="加入购物车">
    </div>
   </div>
</div>
<!---弹窗 s--->


<!---mainbox s--->


<div class="mainbox1">
<!---banner s--->

<div class="banner" style="width: 1000px;">
     {include file="../application/frontend/view/common/banner.html"}
           
</div>

<!---banner e--->
<div class="about_l">

<div class="about_l1">
<div class="about_l1t">&nbsp;&nbsp;&nbsp;&nbsp;客服电话</div>
    <div class="about_l1d">
        <div class="about_l1dt">
        <div class="about_l1dtl"><img src="/static/frontend/img/pay01.jpg"/></div>
        <div class="about_l1dtr">客服电话<br/><span>0756-2999998</span></div>
        </div>

        <div class="about_l1dc"></div>
        
        <div class="about_l1dc">开放时间:24小时</div>
        
        <div class="about_l1dc">酒店地址:广东省珠海市横琴新区富祥湾</div>
        
    </div>
</div>

<!-- <div class="about_l2">
<div class="about_l2t">&nbsp;&nbsp;&nbsp;纯玩线路</div>
<div class="about_l2d">
<ul>
<li><a href="#"><span>精品纯玩线路</span></a></li>
<li><a href="#"><span>纯玩小包团</span></a></li>
<li><a href="#"><span>散客拼团精华线路玩</span></a></li>
<li><a href="#"><span>十人以上独立成团纯玩线路</span></a></li>
<li><a href="#"><span>自由行</span></a></li>
<li><a href="#"><span>自驾车线路</span></a></li>
</ul>
</div>
</div> -->

<div class="about_l3">
<div class="about_l13">&nbsp;&nbsp;&nbsp;&nbsp;精品选择</div>
<div class="about_l3_box">
<div class="about_l3_boxl"><a href="#"><img src="/static/frontend/img/hotel01.jpg" width="101" height="68"/></a></div>
<div class="about_l3_boxr">
<div class="about_l3_boxrt"><a href="#">度假海景大床房</a></div>
<div class="about_l3_boxrd"><span style="color:#color:#ff6600; font-size:12px;">￥</span><span style="font-size: 25px">1298</span>起/间</div>
</div>
</div>
<div class="about_l3_box">
<div class="about_l3_boxl"><a href="#"><img src="/static/frontend/img/hotel01.jpg" width="101" height="68"/></a></div>
<div class="about_l3_boxr">
<div class="about_l3_boxrt"><a href="#">度假园景大床房</a></div>
<div class="about_l3_boxrd"><span style="color:#color:#ff6600; font-size:12px;">￥</span><span style="font-size: 25px">1098</span>起/间</div>
</div>
</div>
<div class="about_l3_box">
<div class="about_l3_boxl"><a href="#"><img src="/static/frontend/img/hotel01.jpg" width="101" height="68"/></a></div>
<div class="about_l3_boxr">
<div class="about_l3_boxrt"><a href="#">度假套房</a></div>
<div class="about_l3_boxrd"><span style="color:#color:#ff6600; font-size:12px;">￥</span><span style="font-size: 25px">2598</span>起/间</div>
</div>
</div>
<div class="about_l3_box">
<div class="about_l3_boxl"><a href="#"><img src="/static/frontend/img/hotel01.jpg" width="101" height="68"/></a></div>
<div class="about_l3_boxr">
<div class="about_l3_boxrt"><a href="#">行政大床房</a></div>
<div class="about_l3_boxrd"><span style="color:#color:#ff6600; font-size:12px;">￥</span><span style="font-size: 25px">1798</span>起/间</div>
</div>
</div>
</div>

<div class="about_l4">
<div class="about_l4t">&nbsp;&nbsp;&nbsp;&nbsp;酒店服务</div>
<div class="about_l4t_list">
	<ul>
	<li><a href="#">可按要求提供无障碍客房</a></li>
	<li><a href="#">24小时客房送餐服务</a></li>
    <li><a href="#">可按要求提供无烟楼层客房</a></li>
	<li><a href="#">24小时礼宾服务</a></li>
	<li><a href="#">设有留言信箱的电话</a></li>
	<li><a href="#">42寸液晶电视</a></li>
	<li><a href="#">安全电子门锁</a></li>
	<li><a href="#">私人保险箱</a></li>
	
    </ul>
    <div class="clear"></div>
	<br/>
</div>
</div>


</div>

<div class="about_r" style="background: blue;">
<div class="moduletable-banner">
	<div class="flexslider"     style="font-size: 20px;color:white;text-align: center;line-height:80px;background-image:url(/static/frontend/img/miui.png)">
		<p>环抱青翠山峦与碧海晴空，坐拥惬意舒适的居住空间。</p>
		<p>典雅现代的客房，满足您不同的住宿需求。</p>
	</div>
</div>
</div>

<div class="about_r1">

<div class="about_r1t">&nbsp;&nbsp;&nbsp;&nbsp;精品纯玩线路</div>
   <div  class="about_r1d" style="height:50px;">
      
      <div id="left" style="width: 50px;height:50px;float:left;text-align:right;" >
          <i class="fa fa-calendar fa-2x" aria-hidden="true"></i>
      </div>
      <div id="right" style="width: 300px;height:50px;float:left;margin-left:0px;line-height:50px;">
          {include file="../application/frontend/view/index/daytest1.html"} 
      </div>
      
       
  </div>

  


    
{foreach $list as $val}
<div class="about_r1d">
<div class="about_r1dl"><a href="#"><img src={$val.product_img} width="128" height="96"/></a></div>
<div class="about_r1dc">
<div class="about_r1dct" id="val_product_name">{$val.product_name}</div>
<div class="about_r1dcc"><span>凭订票手机号入住</span><br/>{$val.product_detail}</div>
</div>
<div class="about_r1dr">
<div class="about_r1drt">¥<span id="val_product_price">{$val.product_price}</span>&nbsp;</div>
<div class="about_r1drc"><a href="#"><img src="/static/frontend/img/pay07.jpg"/></a></div>
</div>
<input type="hidden" value="{$val.product_number}" class="val_product_number">
<input type="hidden" value="{$val.product_count}" class="val_product_count">
</div>
{/foreach}












<div class="clear"></div>

<!--fenye s-->

<div class="about_t_down_fanye">

{$list->render()}
</div>
<!--fenye e-->

</div>

<div class="clear"></div>

</div>

<!---mainbox e--->

<!---footer_box s--->
<div class="footer" style="background-color:white;float: none">
    {include file="../application/frontend/view/common/bottom.html"}
</div>
<!---footer_box e--->

<script type="text/javascript">
$(window).load(function() {
$('.flexslider').flexslider();
});
$(document).ready(function() {
$('.flexslider').hover(function() {
$('.flex-direction-nav li a.prev').css('display', 'block');
$('.flex-direction-nav li a.next').css('display', 'block');
}, function() {
$('.flex-direction-nav li a.prev').css('display', 'none');
$('.flex-direction-nav li a.next').css('display', 'none');
});

});
</script>
<script type="text/javascript">
  /*  var pay=$('.about_r1drc');
  console.log(pay);
  
  pay.each(function(){
  
      $(this).click(function(){
      var num=$(this).parents('.about_r1d').find('.product_number').val();//产品编号
      var date=$('#my-start-2').val();//产品日期
      console.log(num);
      console.log(date);
      var conf = '确定加入购物车吗？';
          if(confirm(conf)==true)
          {
           console.log('yes');
           $.ajax({
              type:"post",
              url:"/frontend/scenic/ajax",
              data:{num:num,date:date},
              dataType:"json",
              success:function(ret){
                  console.log(ret);
              }
            });
          }
      });               
    }); */


  var reduce=$('.min'),
  buy=$('#buy'),
  shopcart=$('#shopcart'),
  plus=$('.add'),
  input=$('#amount');
  var pay=$('.about_r1drc');

   function hideScreen()
  {
    $('#select_box').fadeOut();
  }

   pay.each(function(){

        $(this).click(function(){

           var user_id='<?php echo session('user_id');?>';
          if(user_id!=='')
        {
           $('#select_box').fadeIn();
           var num1=$(this).parents('.about_r1d').find('#val_product_name').html();
           var num2=$(this).parents('.about_r1d').find('#val_product_price').html();
           var num4=parseInt(input.val())*parseFloat(num2);
           var num3=$(this).parents('.about_r1d').find('.val_product_number').val();
           var num5=$(this).parents('.about_r1d').find('.val_product_count').val();

           if($('#my-start-2').val()!='')
           {
            var date1=$('#my-start-2').val();
            var date2=$('#my-end-2').val();
           }
            else
           {
            alert("请选择时间！");
            $('#select_box').fadeOut();
           }
          
           $('#product_name').html(num1);
           $('#product_price').html(num2);
           $('.product_number1').val(num3);
           $('#product_total').html(num4);
           $('#product_count').val(num5);
           $('#date1').html(date1);
           $('#date2').html(date2);
        }
         else
         {
          alert("请先登录！");
         }
 
        });
 
 });

   reduce.click(function()
  {
    var inputval=$(this).next('input'),    
    count=parseInt(inputval.val())-1,    
    priceTotalObj=$(this).parents('.item_content').find('#product_total'),    
    price=$(this).parents('.item_content').find('#product_price').html(),
    priceTotal=count*parseFloat(price);
    inputval.val(count);
    input.val(count);
    priceTotalObj.html(priceTotal);

      if(inputval.val()<=0)
    {
      $(this).attr("disabled",true); 
      priceTotalObj.html('0');
    }
    else
    {
      plus.attr("disabled",false);
    }

  });

    plus.click(function()
  {
    var inputval=$(this).prev('input'),
    count=parseInt(inputval.val())+1,
    priceTotalObj=$(this).parents('.item_content').find('#product_total'),//小计
    price=$(this).parents('.item_content').find('#product_price').html(),//单价
    product_count=$(this).parents('.item_content').find('#product_count').val(),   
    priceTotal=count*parseFloat(price);
    inputval.val(count);
    input.val(count);
    console.log(product_count);
    priceTotalObj.html(priceTotal);
     if(inputval.val()>0 && inputval.val()<parseInt(product_count))
    {
      reduce.attr("disabled",false); 
      
    }
    else
    {
      plus.attr("disabled",true);
    }
    
  });

   shopcart.click(function(){
    if($(this).parents('.selected').find('#amount').val()!='0')
   {
     var priceTotal=$(this).parents('.selected').find('#product_total').html();
     var date1=$('#my-start-2').val();
     var date2=$('#my-end-2').val();
     var count=$(this).parents('.selected').find('#amount').val();
     var product_number=$(this).parents('.selected').find('.product_number1').val();

     console.log(product_number);
     
     $.ajax({
          type:"post",
          url:"/frontend/hotel/shopcart",
          data:{id:product_number,priceTotal:priceTotal,count:count,date_s:date1,date_e:date2},
          dataType:"json",
          success:function(ret){
            alert("添加购物车成功！");
            console.log(ret);
            $('#select_box').fadeOut();
           
              }

         });
     }
     else
   {
    alert("门票数量不能为零！");
   }

});

  buy.click(function(){
     if($(this).parents('.selected').find('#amount').val()!='0')
    {
     var priceTotal=$(this).parents('.selected').find('#product_total').html();
     var date1=$('#my-start-2').val();
     var date2=$('#my-end-2').val();
     var count=$(this).parents('.selected').find('#amount').val();
     var product_number=$(this).parents('.selected').find('.product_number1').val();
     var product_name=$(this).parents('.selected').find('#product_name').html();

      if($('#user_score').val()==0.95)
       {
        alert('根据积分，您可享有9.5折优惠');
       }
       else if($('#user_score').val()==0.9)
       {
        alert('根据积分，您可享有9折优惠');
       }
       else if($('#user_score').val()==0.8)
       {
        alert('根据积分，您可享有8折优惠');
       }
       else if($('#user_score').val()==1)
       {
        alert('根据积分，您暂无可享优惠');
       }
    
     
     $.ajax({
          type:"post",
          url:"/frontend/hotel/buy",
          data:{id:product_number,priceTotal:priceTotal,count:count,date_s:date1,date_e:date2},
          dataType:"json",
          success:function(ret){
          
            $('#select_box').fadeOut();
            window.location.href = '/test/blipay/pagepay?WIDtotal_amount='+priceTotal+'&shopcartId='+ret[0]+'&WIDout_trade_no='+ret[1]+'&WIDsubject='+product_name;
           
              }

         });
      }
      else
    {
      alert("门票数量不能为零！");
    } 

});


        
      
    
</script>

</body>
</html>
